package com.xcc.myrouter;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.xcc.routerlib.CiRouter;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btnGo).setOnClickListener(this);
    }

    public void onClick(View v) {
        //{"list":["rookieCi1","rookieCi2"],"mode":{"name":"_MyModeName_","id":998},"name":"rookieCi","id":999}
        new CiRouter.Builder(this)
                .setAction("com.xcc.myrouter.TwoActivity")
                .setExtras("{\"list\":[\"rookieCi1\",\"rookieCi2\"],\"mode\":{\"name\":\"_MyModeName_\",\"id\":998},\"name\":\"rookieCi\",\"id\":999,\"c\":\"n\"}")
                .create().start();
    }
}